/*
 * @Author: xiaosihan
 * @Date: 2021-04-24 22:30:59
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2021-11-07 13:57:45
 */

import React from "react";
import { ClipPlane, Group3D, Plane } from "xsh-react-three";
import MyController from "../MyController/MyController";
import Taideng from "../Taideng/Taideng";
import ringTexture1PNG from "./ringTexture1.png";


interface Props { }

interface State { }

export default class MeshDemo extends Group3D<Props, State> {
    constructor(props: Props) {
        super(props);
    }


    render() {

        const { dev } = this.context;

        return (
            <>
                {/* 控制器和相机 */}
                <MyController />

                <Group3D>
                    {/* 台灯模型 */}
                    <Taideng />

                    <ClipPlane
                        name="ClipPlane1"
                        position={{ x: 0, y: 0, z: 0 }}
                        rotation={{ x: 0, y: 0, z: 0 }}
                        size={5}
                    />

                    <ClipPlane
                        name="ClipPlane2"
                        position={{ x: 0, y: 0, z: 0 }}
                        rotation={{ x: 0, y: Math.PI / 2, z: 0 }}
                        size={5}
                    />
                </Group3D>

                <Plane
                    position={{ y: 5 }}
                    glow_enable={true}
                    glow_visibleColor={"#0f0"}
                    map={ringTexture1PNG}
                />

            </>
        )
    }
}